//
//  GoodInfoCollectionViewCell.m
//  BaseFrame
//
//  Created by 吕金状 on 2017/6/19.
//  Copyright © 2017年 com.mxh. All rights reserved.
//

#import "GoodInfoCollectionViewCell.h"

@interface GoodInfoCollectionViewCell ()

Strong UIImageView *titleImageView;

@end

@implementation GoodInfoCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        _titleImageView = [UIImageView new];
        _titleImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.contentView addSubview:_titleImageView];
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    _titleImageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_WIDTH / 4);
}

- (void)setModel:(NSString *)model{
    _model = model;
    [_titleImageView sd_setImageWithURL:[NSURL URLOffsetIPWithString:model]];
}

@end
